x = {'t-2';'t-1';'t';'t+1';'t+2';'≥ t+3'};
lwid = 2;

x2 = [-1:0.01:7];
x3 = [1;2;3;4;5;6];
y = zeros(length(x2),1);

C1 = [0.010835
0.020616
0.015264
0.022462
0.023962
0.020436];
C2 = [0.005023
0.005688
0.011724
0.001963
0.009385
-0.007738];
C3 = [0.007284
0.003334
-0.002041
0.001305
-0.005581
-0.00827];
C4 = [0.000392
-0.001894
0.002615
-0.001031
0.000904
-0.004506];
 
 
tC1 = [1.06
2.2
1.51
2.06
2.15
2.06];
tC2 = [0.68
0.7
1.49
0.21
0.95
-0.84];
tC3 = [1.93
0.86
-0.51
0.3
-1.25
-1.91];
tC4 = [0.12
-0.57
0.77
-0.27
0.22
-1.06];

EC1 = 1.64*(C1./tC1);
EC2 = 1.64*(C2./tC2);
EC3 = 1.64*(C3./tC3);
EC4 = 1.64*(C4./tC4);

figure(1)
hold on
fill([x3;flipud(x3)],[C1-EC1;flipud(C1+EC1)],[.8 .8 .8],'linestyle','none','FaceAlpha',0.3);
fill([x3;flipud(x3)],[C3-EC3;flipud(C3+EC3)],[.55 .55 .55],'linestyle','none','FaceAlpha',0.3);
p1 = plot(x3,C1,'k',x3,C3,'k--','LineWidth',lwid);
plot(x2,y,'k')
set(gca,'FontSize',13)
ylabel('Coefficient','FontSize',19);
xlim([0.5 6.5])
ylim([-0.025 0.05])
xticks([1:1:6])
yticks([-0.02:0.01:0.05])
grid on
xticklabels(x);
legend(p1,{'Direct Transitions','Indirect Transitions'},'Location','northwest')
hold off
print(gcf,'Figure4a.tiff','-dtiff','-r300'); 

figure(2)
hold on
fill([x3;flipud(x3)],[C2-EC2;flipud(C2+EC2)],[.8 .8 .8],'linestyle','none','FaceAlpha',0.3);
fill([x3;flipud(x3)],[C4-EC4;flipud(C4+EC4)],[.55 .55 .55],'linestyle','none','FaceAlpha',0.3);
p1 = plot(x3,C2,'k',x3,C4,'k--','LineWidth',lwid);
plot(x2,y,'k')
set(gca,'FontSize',13)
ylabel('Coefficient','FontSize',19);
xlim([0.5 6.5])
ylim([-0.025 0.05])
xticks([1:1:6])
yticks([-0.02:0.01:0.05])
grid on
xticklabels(x);
legend(p1,{'Direct Transitions','Indirect Transitions'},'Location','northwest')
hold off
print(gcf,'Figure4b.tiff','-dtiff','-r300'); 